package com.dianping.cat.alarm;

import org.unidal.dal.jdbc.DataField;
import org.unidal.dal.jdbc.QueryDef;
import org.unidal.dal.jdbc.QueryType;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;
import org.unidal.dal.jdbc.annotation.Attribute;
import org.unidal.dal.jdbc.annotation.Entity;
import org.unidal.dal.jdbc.annotation.Variable;

@Entity(logicalName = "user-define-rule", physicalName = "user_define_rule", alias = "udr")
public class UserDefineRuleEntity
{
  @Attribute(field = "id", nullable = false, primaryKey = true, autoIncrement = true)
/* 16 */   public static final DataField ID = new DataField("id");

  @Attribute(field = "content", nullable = false)
/* 19 */   public static final DataField CONTENT = new DataField("content");

  @Attribute(field = "creation_date", nullable = false, insertExpr = "NOW()")
/* 22 */   public static final DataField CREATION_DATE = new DataField("creation-date");

  @Attribute(field = "", nullable = false, selectExpr = "max(id)")
/* 25 */   public static final DataField MAX_ID = new DataField("max-id");

  @Variable
/* 28 */   public static final DataField KEY_ID = new DataField("key-id");

/* 30 */   public static final Readset<UserDefineRule> READSET_FULL = new Readset(new DataField[] { ID, CONTENT, CREATION_DATE });

/* 32 */   public static final Readset<UserDefineRule> READSET_MAXID = new Readset(new DataField[] { MAX_ID });

/* 34 */   public static final Updateset<UserDefineRule> UPDATESET_FULL = new Updateset(new DataField[] { ID, CONTENT });

/* 36 */   public static final QueryDef FIND_BY_PK = new QueryDef("findByPK", UserDefineRuleEntity.class, QueryType.SELECT, "SELECT <FIELDS/> FROM <TABLE/> WHERE <FIELD name='id'/> = ${key-id}");


/* 39 */   public static final QueryDef INSERT = new QueryDef("insert", UserDefineRuleEntity.class, QueryType.INSERT, "INSERT INTO <TABLE/>(<FIELDS/>) VALUES(<VALUES/>)");


/* 42 */   public static final QueryDef UPDATE_BY_PK = new QueryDef("updateByPK", UserDefineRuleEntity.class, QueryType.UPDATE, "UPDATE <TABLE/> SET <FIELDS/> WHERE <FIELD name='id'/> = ${key-id}");


/* 45 */   public static final QueryDef DELETE_BY_PK = new QueryDef("deleteByPK", UserDefineRuleEntity.class, QueryType.DELETE, "DELETE FROM <TABLE/> WHERE <FIELD name='id'/> = ${key-id}");


/* 48 */   public static final QueryDef FIND_MAX_ID = new QueryDef("findMaxId", UserDefineRuleEntity.class, QueryType.SELECT, "SELECT <FIELDS/> FROM <TABLE/>");
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-alarm-3.0.0.jar!/com/dianping/cat/alarm/UserDefineRuleEntity.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */